<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="com.google.appengine.api.users.User"%>
<%@ page import="com.google.appengine.api.users.UserService"%>
<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>

<html>
	<head>
		<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css">
		<link rel="stylesheet" type="text/css" href="/css/main.css">
		
		<script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
	</head>
	
	<body>
		<%
		    UserService userService = UserServiceFactory.getUserService();
		    User user = userService.getCurrentUser();
		%>
		
		<div id="userBar">
		
		<%
		    if (null != user) {
		%>
			<%= user.getEmail() %> | <a href="<%= userService.createLogoutURL(request.getRequestURI()) %>">sign out</a>
		<%
		    } else {
		%>
			<a href="<%= userService.createLoginURL(request.getRequestURI()) %>">sign in</a>
		<%
		    }
		%>
		
		</div>
		
		<%-- Continue generate content... --%>